﻿Imports LiarsDice.CommonHand

Public Class SimpleAIPlayer
    Inherits PlayerBase

    Public Sub New()
        AddHandler Me.TimeToMakeABid, AddressOf ComputeBid

        Me.Name = "Simple AI"
    End Sub

    Public Sub ComputeBid(ByVal player As PlayerBase, ByVal previousBid As Bid)
        If (previousBid Is Nothing) Then
            previousBid = New Bid(BidType.Raise, New CommonHandBidValue(1, 1))
        End If

        Dim computedBid As Bid = New Bid(BidType.Raise, New CommonHandBidValue(previousBid.BidValue.DieValue + 1, previousBid.BidValue.DieCount))

        Me.MakeBid(computedBid)
    End Sub

    Public Overrides ReadOnly Property IsHuman As Boolean
        Get
            Return False
        End Get
    End Property
End Class
